import java.io.*;
import org.jdom2.*;
import org.jdom2.input.*;
import java.util.List;
import java.util.Iterator;

public class JDOM2
{
   static org.jdom2.Document document;
   static Element racine;

   public static void main(String[] args)
   {
      SAXBuilder sxb = new SAXBuilder();
      try
      {
         document = sxb.build(new File("MapBackUp/map1.xml"));
      }
      catch(Exception e){
    	  e.printStackTrace();
      }

      racine = document.getRootElement();
      String size = racine.getChild("Size").getText();
      System.out.println(size);
//
//      afficheALL();
   }
   
   static void afficheALL()
   {
      List listCells = racine.getChildren("Cell");

      Iterator i = listCells.iterator();
      while(i.hasNext())
      {    
         Element courant = (Element)i.next();
         System.out.println(courant.getChild("Type").getText());
      }
   }

}
